package cn.hg.solon.youcan.system.service;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import cn.hg.solon.youcan.system.entity.SysRole;
import cn.hg.solon.youcan.system.entity.SysUser;

/**
 * @author 胡高
 */
public interface SysRoleService extends IService<SysRole> {
    void assignDataScope(SysRole role, String dataScope, List<Integer> deptIdArray);

    void assignPermission(SysRole role, List<Integer> permissionIdArray);

    boolean checkUnique(SysRole bean);

    SysRole getByCode(String code);

    List<SysRole> listByStatus(String status);

    List<SysRole> listByUser(SysUser user);

    Page<SysRole> pageByMap(Page<SysRole> page, Map<String, Object> paraMap);

    @Override
    boolean removeByIds(Collection<? extends Serializable> ids);

    @Override
    boolean save(SysRole bean);

    boolean update(SysRole bean);
}
